package org.gp.core.mapper;

import org.apache.ibatis.annotations.Param;
import org.gp.core.entity.Activity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.gp.core.entity.result.ActivityDetailResult;
import org.gp.core.entity.result.ActivityResult;
import org.gp.core.entity.result.ActivityWeekNum;
import org.gp.core.entity.result.CountTypeResult;

import java.util.List;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author LuoLiang
 * @since 2017-02-06
 */
public interface ActivityMapper extends BaseMapper<Activity> {
    /**
     * 查询活动详情
     *
     * @param id
     * @return
     */
    ActivityDetailResult getActivityDetail(Integer id);

    /**
     * 查询用户参加过的活动
     *
     * @return
     */
    List<ActivityDetailResult> getActivityListByUser(@Param("userId") Integer userId,@Param("flag") Integer flag);

    List<CountTypeResult> countActivityType();

    List<ActivityWeekNum> countActivityNumByWeek(Integer label);
}